#include <stdio.h>
#include <stdlib.h>

#define PI  3.1415
/*#define PI XXXX */

#define ADD 2 + 3


//#define MAX(A,B) A>B?A:B
//good:
//#define MAX(A,B) (A)>(B)?(A):(B)

//bast:
/*#define MAX(a,b) \
	({int A=a,B=b;(A)>(B)?(A):(B);})
*/



#define MAX(a,b) \ 
	({typeof(a) A=a,B=b;(A)>(B)?(A):(B);})//just like golang->interface

int main(void)
{
	int r1,r2,r3;
	
	r1 * PI;

	r2 * PI;

	r3 * PI;
	
	/*
 	*gcc -E define.c
 	*/	

	printf("ADD = %d\n",ADD);
	
	int i,j;
	i = 5;
	j = 3;	

	printf("%d\n",MAX(i,j));


	printf("=============\n");
	
	printf("%d\n",MAX(i,j*2));//plz gcc -E define.c


	printf("============\n");


	printf("i=%d\tj=%d\n",i,j);

	printf("%d\n",MAX(i++,j++));//plz gcc -E define.c
	
	printf("i=%d\tj=%d\n",i,j);
	

	exit(0);

	

}
